// 写所有的后台接口，做到后台接口的统一管理
import request from '@/utils/request.js'

// 1.设备概览接口
export const $deviceCount = () => {
  return request.get('/device/count')
}

// 2.传感器接口
export const $sensorCount = () => {
  return request.get('/sensor/count')
}

// 3.设备数据接口
export const $deviceSensorList = () => {
  return request.get('/device/sensorList')
}

// 4.设备网关接口
export const $gatewayList = (params) => {
  return request.get('/gateway/list', { params })
}

// 5.设备群组接口
export const $groupList = (params) => {
  return request.get('/group/list', { params })
}
// 群组--添加
export const $groupAdd = (data) => {
  return request.post('/group/add', data)
}
// 群组--修改
export const $groupEdit = (data) => {
  return request.post('/group/edit', data)
}
// 群组--删除
export const $groupDel = (data) => {
  return request.post('/group/del', data)
}

// 6.登录api
export const $accountLogin = (params) => {
  return request.post('/account/login', params)
}
